package front.windows;

import javax.swing.JOptionPane;

import config.GeneralConfig;
import config.GeneralConfig.MethodsSendUser;

import utils.helpers.logging.LineLog;

public class Send {
	public static void sendToUser ( boolean r  ) {
		if ( !r ) {
			switch ( GeneralConfig.methodSendUser ) {
			case UI: sendByUI ( ); break;
			case MAIL: ; break;
			case CONSOLE: sendByConsole(); break;
			}
		}
	}
	
	public static void sendByUI (  ) {
		JOptionPane.showMessageDialog(null,  LineLog.lastjson.toString() );
	}
	
	public static void sendByMail (  ) {
		// TODO: envia per email
	}

	public static void sendByConsole (  ) {
		System.out.println ( "***********************************************+");
		System.out.println ( "***********************************************+");
		System.out.println ( "***********************************************+");
		System.out.println ( LineLog.lastjson.toString()  );
		System.out.println ( "------------------------------------------------");
	}

}
